/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package th.model;

import java.io.Serializable;
import java.util.Date;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Embedded;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

/**
 *
 * @author fikri
 */
@Entity
@Table(name = "sej_pguna")
@NamedQueries({
    @NamedQuery(name = "SejarahPengguna.findAll", query = "SELECT s FROM SejarahPengguna s")})
public class SejarahPengguna implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Basic(optional = false)
    @Column(name = "id_sej_pguna")
    private Integer idSejPguna;
    @Basic(optional = false)
    @Column(name = "noKp")
    private String noKp;
    @Basic(optional = false)
    @Column(name = "id_pguna")
    private String idPguna;
    @Column(name = "catatan")
    private String catatan;
    @Embedded
    private InfoAudit infoAudit;

    public SejarahPengguna() {
    }

    public SejarahPengguna(Integer idSejPguna) {
        this.idSejPguna = idSejPguna;
    }
    public Integer getIdSejPguna() {
        return idSejPguna;
    }

    public void setIdSejPguna(Integer idSejPguna) {
        this.idSejPguna = idSejPguna;
    }

    public String getNoKp() {
        return noKp;
    }

    public void setNoKp(String noKp) {
        this.noKp = noKp;
    }

    public String getIdPguna() {
        return idPguna;
    }

    public void setIdPguna(String idPguna) {
        this.idPguna = idPguna;
    }

    public String getCatatan() {
        return catatan;
    }

    public void setCatatan(String catatan) {
        this.catatan = catatan;
    }

    public InfoAudit getInfoAudit() {
        return infoAudit;
    }

    public void setInfoAudit(InfoAudit infoAudit) {
        this.infoAudit = infoAudit;
    }

    

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (idSejPguna != null ? idSejPguna.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof SejarahPengguna)) {
            return false;
        }
        SejarahPengguna other = (SejarahPengguna) object;
        if ((this.idSejPguna == null && other.idSejPguna != null) || (this.idSejPguna != null && !this.idSejPguna.equals(other.idSejPguna))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "th.model.SejarahPengguna[ idSejPguna=" + idSejPguna + " ]";
    }
    
}
